//
//  test_grammar.h
//  TestMac
//
//  Created by 小星星吃KFC on 2021/7/15.
//

#import <Foundation/Foundation.h>

#define IFTEST1 1
#define IFTEST2 2

static void test_grammar(void){
    
    
    
#ifdef IFTEST1
    NSLog(@"定义了宏");
#else
    NSLog(@"没有定义了宏");
#endif
    
    
#ifdef IFTEST1
    NSLog(@"定义了宏-IFTEST1");
#elif IFTEST2
    NSLog(@"定义了宏-IFTEST2");
#else
    NSLog(@"都没有定义");
#endif
    
    
#if IFTEST1 == 1
    NSLog(@"宏定义值1:%d\n", IFTEST1);
#elif IFTEST1 == 2
    NSLog(@"宏定义值2:%d\n", IFTEST1);
#endif
    
}
